<template>
  <div>
    <MyHeader :color="'white'" :backgroundColor="'yellowgreen'" />
    <MyGoods v-for="obj in list" :key="obj.id" :gObj="obj" />
    <MyFooter :arr="list"></MyFooter>
  </div>
</template>

<script>
import MyHeader from "@/components/MyHeader"
import MyGoods from "@/components/MyGoods"
import MyFooter from "@/components/MyFooter"

export default {
  data() {
    return {
      list: [],
    }
  },
  created() {
    this.$axios({
      url: "api/cart",
    }).then((res) => {
      console.log(res)
      this.list = res.data.list
    })
  },
  components: {
    MyGoods,
    MyFooter,
    MyHeader,
  },
}
</script>

<style></style>
